<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:ui="http://java.sun.com/jsf/facelets">
      
	<body>
		<ui:composition template="/WEB-INF/templates/template.xhtml">
			<ui:define name="content">
				<h2>Owners:</h2>
				
				<h:dataTable value="#{actionResult}" var="currentOwner">
					<h:column>
						<f:facet name="header">Name</f:facet>
						<h:outputLink value="owner.xhtml">
							<f:param name="id" value="#{currentOwner.id}" />
							<h:outputText value="#{currentOwner.firstName}" />
							<h:outputText value=" " />
							<h:outputText value="#{currentOwner.lastName}" />
						</h:outputLink>
					</h:column>
					<h:column>
						<f:facet name="header">Address</f:facet>
						<h:outputText value="#{currentOwner.address}" />
					</h:column>
					<h:column>
						<f:facet name="header">City</f:facet>
						<h:outputText value="#{currentOwner.city}" />
					</h:column>
					<h:column>
						<f:facet name="header">Telephone</f:facet>
						<h:outputText value="#{currentOwner.telephone}" />
					</h:column>
					<h:column>
						<f:facet name="header">Pets</f:facet>
						<ui:repeat value="#{currentOwner.pets}" var="currentPet">
							<h:outputText value="#{currentPet.name}" />
							<h:outputText value=" " />
						</ui:repeat>
					</h:column>
				</h:dataTable>
			</ui:define>
		</ui:composition>
	</body>
</html>
